// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 创建订单 POST /api/orders/createOrder */
export async function createOrderUsingPost(body: API.Order, options?: { [key: string]: any }) {
  return request<API.Order_>('/api/orders/createOrder', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 删除订单 DELETE /api/orders/deleteOrder/${param0} */
export async function deleteOrderUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteOrderUsingDELETEParams,
  options?: { [key: string]: any }
) {
  const { orderId: param0, ...queryParams } = params
  return request<API.Void_>(`/api/orders/deleteOrder/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 查询订单 GET /api/orders/getOrder/${param0} */
export async function getOrderUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getOrderUsingGETParams,
  options?: { [key: string]: any }
) {
  const { orderId: param0, ...queryParams } = params
  return request<API.Order_>(`/api/orders/getOrder/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 更新订单 PUT /api/orders/updateOrder */
export async function updateOrderUsingPut(body: API.OrderDTO, options?: { [key: string]: any }) {
  return request<API.Void_>('/api/orders/updateOrder', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
